$('.treeview>a').click(function(){
	$(this).parent('li').toggleClass('active').siblings('.treeview').removeClass('active');
	console.log($("body",parent.document).find(window).scrollTop())
})
$('.treeview-menu li').click(function(){
	var wHeight = $(window).height();
	var tabHeight = wHeight-52;
	var iframeHeight = tabHeight-10;
	console.log(wHeight);
	var tabList = "<li class='tab-block'>" +
				  "<a class='active'><span>" + $(this).text() + "</span></a>" +
				  "<i class='iconfont icon-iclose'></i>" +
				  "</li>"
	var tabContent = "<div class='tabpanel active' style='height:" + tabHeight + "px;'>" +
					 "<iframe src=" + $(this).attr('data-link') + " class='iframe-tabpanel' frameborder='0' style='overflow-x:hidden;'></iframe>"+
				     "</div>"
	$('.treeview-menu li').removeClass('active');
	$(this).addClass('active');
	$("body",parent.document).find('.tab-block a').removeClass('active');
	$("body",parent.document).find('.tabpanel').removeClass('active');
	$("body",parent.document).find('#tablist').append(tabList);
	$("body",parent.document).find('#tabContent').append(tabContent);
})